package com.dlc.yunguang.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.OnClick;

import com.dlc.yunguang.activity.InventoryCategoryActivity;
import com.dlc.yunguang.activity.InventoryRecordActivity;
import com.dlc.yunguang.activity.WashActivity;
import com.dlc.yunguang.base.BaseFragment;
import com.dlc.yunguang.base.Constants;
import com.dlc.yunguang.R;

/**
 * 管理员首页
 */
public class HomeManagerFragment extends BaseFragment {

    @BindView(R.id.item_1) TextView mItem1;
    @BindView(R.id.item_2) TextView mItem2;
    @BindView(R.id.item_3) TextView mItem3;
    @BindView(R.id.item_4) TextView mItem4;



    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
        @Nullable Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_home_manager;
    }

    @OnClick({ R.id.item_1, R.id.item_2, R.id.item_3, R.id.item_4 })
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.item_1:
               // ToastUtil.showOne(getActivity(), R.string.home_manager_block_1);
                startActivity(new Intent(getActivity(), InventoryCategoryActivity.class));
                break;
            case R.id.item_2:
                //ToastUtil.showOne(getActivity(), R.string.home_manager_block_2);
                startActivity(new Intent(getActivity(), InventoryRecordActivity.class));
                break;
            case R.id.item_3:
               // ToastUtil.showOne(getActivity(), R.string.home_manager_block_3);
                startActivity(new Intent(getActivity(), WashActivity.class).putExtra("type", Constants.START_TYPE.WASH_ORDER));
                break;
            case R.id.item_4:
               // ToastUtil.showOne(getActivity(), R.string.home_manager_block_4);
                startActivity(new Intent(getActivity(), WashActivity.class).putExtra("type",Constants.START_TYPE.LEASE_ORDER));
                break;
        }
    }



}
